package com.ruoyi.swap.realtime.lastesttrade.service.impl;

import java.util.List;

import com.ruoyi.swap.realtime.lastesttrade.domain.VO.SwapLastesttradeRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.swap.realtime.lastesttrade.mapper.SwapLastesttradeRealtimeDataMapper;
import com.ruoyi.swap.realtime.lastesttrade.domain.SwapLastesttradeRealtimeData;
import com.ruoyi.swap.realtime.lastesttrade.service.ISwapLastesttradeRealtimeDataService;

/**
 * 实时成交Service业务层处理
 * 
 * @author saumell
 * @date 2024-08-05
 */
@Service
public class SwapLastesttradeRealtimeDataServiceImpl implements ISwapLastesttradeRealtimeDataService 
{
    @Autowired
    private SwapLastesttradeRealtimeDataMapper swapLastesttradeRealtimeDataMapper;

    /**
     * 查询实时成交
     * 
     * @param id 实时成交主键
     * @return 实时成交
     */
    @Override
    public SwapLastesttradeRealtimeDataVO selectSwapLastesttradeRealtimeDataById(Integer id)
    {
        return swapLastesttradeRealtimeDataMapper.selectSwapLastesttradeRealtimeDataById(id);
    }

    /**
     * 查询实时成交列表
     * 
     * @param swapLastesttradeRealtimeData 实时成交
     * @return 实时成交
     */
    @Override
    public List<SwapLastesttradeRealtimeDataVO> selectSwapLastesttradeRealtimeDataList(SwapLastesttradeRealtimeDataVO swapLastesttradeRealtimeData)
    {
        return swapLastesttradeRealtimeDataMapper.selectSwapLastesttradeRealtimeDataList(swapLastesttradeRealtimeData);
    }

    /**
     * 新增实时成交
     * 
     * @param swapLastesttradeRealtimeData 实时成交
     * @return 结果
     */
    @Override
    public int insertSwapLastesttradeRealtimeData(SwapLastesttradeRealtimeData swapLastesttradeRealtimeData)
    {
        return swapLastesttradeRealtimeDataMapper.insertSwapLastesttradeRealtimeData(swapLastesttradeRealtimeData);
    }

    /**
     * 修改实时成交
     * 
     * @param swapLastesttradeRealtimeData 实时成交
     * @return 结果
     */
    @Override
    public int updateSwapLastesttradeRealtimeData(SwapLastesttradeRealtimeData swapLastesttradeRealtimeData)
    {
        return swapLastesttradeRealtimeDataMapper.updateSwapLastesttradeRealtimeData(swapLastesttradeRealtimeData);
    }

    /**
     * 批量删除实时成交
     * 
     * @param ids 需要删除的实时成交主键
     * @return 结果
     */
    @Override
    public int deleteSwapLastesttradeRealtimeDataByIds(Integer[] ids)
    {
        return swapLastesttradeRealtimeDataMapper.deleteSwapLastesttradeRealtimeDataByIds(ids);
    }

    /**
     * 删除实时成交信息
     * 
     * @param id 实时成交主键
     * @return 结果
     */
    @Override
    public int deleteSwapLastesttradeRealtimeDataById(Integer id)
    {
        return swapLastesttradeRealtimeDataMapper.deleteSwapLastesttradeRealtimeDataById(id);
    }

    @Override
    public List<SwapLastesttradeRealtimeDataVO> selectSwapAllData() {
        return swapLastesttradeRealtimeDataMapper.selectSwapAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return swapLastesttradeRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
